D_1=importdata('reportD.txt');
x=linspace(0,13,10000);
D=ones(10,10000);
for j=1:10000
        D(1,j)=1;
        D(2,j)=x(j);
        D(3,j)=D(2,j)*x(j);
        D(4,j)=D(3,j)*(x(j)-3);
        D(5,j)=D(4,j)*(x(j)-3);
        D(6,j)=D(5,j)*(x(j)-5);
        D(7,j)=D(6,j)*(x(j)-5);
        D(8,j)=D(7,j)*(x(j)-8);
        D(9,j)=D(8,j)*(x(j)-8);
        D(10,j)=D(9,j)*(x(j)-13);
end
y_1=D_1'*D;
k=0;
for i=1:9999
   if y_1(i+1)-y_1(i) > 81*13/10000
       k=1;
   end
end

fig=figure(1);hold on;
plot(x,y_1);
hold off;
frame=getframe(fig);
img=frame2im(frame);
imwrite(img,'D.png');
